package com.jnu.myfirstapplication.recycleItem;

//public class MainActivity extends AppCompatActivity implements GridAdapter.OnItemClickListener{
//    private RecyclerView rv_user;
//    private GridAdapter adapter;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.image_main);
//        initView();
//    }
//
//    private void initView() {
//        rv_user = (RecyclerView) findViewById(R.id.rv_user);
//        adapter = new GridAdapter(this, DataUtils.getUserGrids());
//
//        ItemTouchCallBack touchCallBack = new ItemTouchCallBack();
//        touchCallBack.setOnItemTouchListener(adapter);
//        ItemTouchHelper itemTouchHelper = new ItemTouchHelper(touchCallBack);
//
//        rv_user.setLayoutManager(new GridLayoutManager(this,3));
////        rv_user.setLayoutManager(new LinearLayoutManager(this));
//        rv_user.setAdapter(adapter);
//        itemTouchHelper.attachToRecyclerView(rv_user);
//
//        adapter.setOnItemClickListener(this);
//
//    }
//
//    @Override
//    public void onItemClick(RecyclerView recyclerView, View view, int position, Book obj) {
//        Toast.makeText(MainActivity.this, obj.getTitle(), Toast.LENGTH_SHORT).show();
//    }
//
//    @Override
//    public void onPointerCaptureChanged(boolean hasCapture) {
//        super.onPointerCaptureChanged(hasCapture);
//    }
//}
